# Handle our dependencies
set(fletch_DIR "@fletch_DIR@" CACHE PATH
  "The directory containing a CMake configuration file for fletch."
  )
set(Eigen3_DIR "@Eigen3_DIR@" CACHE PATH
  "The directory containing a CMake configuration file for Eigen3."
  )

include(CMakeFindDependencyMacro)
find_dependency(Eigen3 NO_MODULE)

# Export definitions for kwiver to be used from find_package
include("${CMAKE_CURRENT_LIST_DIR}/kwiver-config-targets.cmake")

set(KWIVER_BUILT_SHARED  @BUILD_SHARED_LIBS@)

# KWIVER version
set(KWIVER_VERSION_MAJOR @KWIVER_VERSION_MAJOR@)
set(KWIVER_VERSION_MINOR @KWIVER_VERSION_MINOR@)
set(KWIVER_VERSION_PATCH @KWIVER_VERSION_PATCH@)
set(KWIVER_VERSION "@KWIVER_VERSION@")

# Extend module path for KWIVER utils
set(CMAKE_MODULE_PATH "@KWIVER_CMAKE_DIR@" "${CMAKE_MODULE_PATH}")

# KWIVER include directory
set(KWIVER_INCLUDE_DIRS
  "@KWIVER_SOURCE_DIR@"
  "@KWIVER_BINARY_DIR@"
  "@KWIVER_BINARY_DIR@/vital/kwiversys"
  "@KWIVER_SOURCE_DIR@/sprokit/src"
  "@KWIVER_BINARY_DIR@/sprokit/src"
  "@KWIVER_INCLUDE_DIRS@" )

set(KWIVER_TEST_INCLUDE_DIRS
  "@KWIVER_SOURCE_DIR@/tests"
  )

if (WIN32)
  set(SETUP_BATCH_FILES "@SETUP_BATCH_FILES@")
  add_definitions(-DBOOST_ALL_NO_LIB)
  add_definitions(-DBOOST_PROGRAM_OPTIONS_DYN_LINK)
  if(${MSVC_VERSION} GREATER_EQUAL 1915)
    # You must acknowledge that you understand MSVC
    # resolved a byte alignment issue in this compiler.
    # We get this due to using Eigen objects and
    # allocating those objects with make_shared
    add_definitions(-D_ENABLE_EXTENDED_ALIGNED_STORAGE)
  endif()
endif ()

set(KWIVER_DEFAULT_LIBRARY_DIR "@KWIVER_DEFAULT_LIBRARY_DIR@")
set(KWIVER_LIBRARY_DIR         "@KWIVER_BINARY_DIR@/@KWIVER_DEFAULT_LIBRARY_DIR@")
set(KWIVER_LIBRARIES           @kwiver_libs@)
set(KWIVER_ENABLE_PYTHON       "@KWIVER_ENABLE_PYTHON@")
set(KWIVER_PYTHON_MAJOR_VERSION "@KWIVER_PYTHON_MAJOR_VERSION@")
set(KWIVER_PYTHON_VERSION      "@KWIVER_PYTHON_VERSION@")
set(KWIVER_LIBRARY_DIRS        "${KWIVER_LIBRARY_DIR}"  "@KWIVER_LIBRARY_DIRS@")
set(KWIVER_MODULE_DIR          "${KWIVER_LIBRARY_DIR}/modules")
set(KWIVER_DOCUMENTATION_DIR   "@KWIVER_BINARY_DIR@/doc")
set(KWIVER_CMAKE_DIR           "@KWIVER_CMAKE_DIR@")

set(KWIVER_DIR "@KWIVER_BINARY_DIR@")
